romenigld
Amazon AWS S3 Public bucket
Hello guys I am doing the course Liveview course of the pragprog and I would like to know how to put the Amazon AWS S3 bucket to be public.
I created the bucket and put the ‘CORS’ on the ‘Permissions’.
But I can’t put this new bucket on public.
Someone could help me with this please?
My application is complaining for this:
[error] GenServer #PID<0.713.0> terminating
** (FunctionClauseError) no function clause matching in RldLiveViewStudioWeb.DesksLive.error_to_string/1
(rld_live_view_studio 0.1.0) lib/rld_live_view_studio_web/live/desks_live.ex:74: RldLiveViewStudioWeb.DesksLive.error_to_string(:external_client_failure)
(rld_live_view_studio 0.1.0) lib/rld_live_view_studio_web/live/desks_live.html.heex:49: anonymous fn/3 in RldLiveViewStudioWeb.DesksLive.render/1
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:398: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:571: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_comprehension/5
(elixir 1.14.3) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:484: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:571: anonymous fn/3 in Phoenix.LiveView.Diff.traverse_comprehension/5
(elixir 1.14.3) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.14.3) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir 1.14.3) lib/enum.ex:1780: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:450: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:373: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:373: Phoenix.LiveView.Diff.traverse/7
Last message: %Phoenix.Socket.Message{topic: "lv:phx-F5alJ2XuJWOBaQGj", event: "progress", payload: %{"entry_ref" => "0", "event" => nil, "progress" => %{"error" => "failed"}, "ref" => "phx-F5alJ5A-iS4F6QMC"}, ref: "11", join_ref: "4"}
State: %{components: {%{}, %{}, 1}, join_ref: "4", serializer: Phoenix.Socket.V2.JSONSerializer, socket: #Phoenix.LiveView.Socket<id: "phx-F5alJ2XuJWOBaQGj", endpoint: RldLiveViewStudioWeb.Endpoint, view: RldLiveViewStudioWeb.DesksLive, parent_pid: nil, root_pid: #PID<0.713.0>, router: RldLiveViewStudioWeb.Router, assigns: %{__changed__: %{}, flash: %{}, form: %Phoenix.HTML.Form{source: #Ecto.Changeset<action: :validate, changes: %{name: "Wally"}, errors: [], data: #RldLiveViewStudio.Desks.Desk<>, valid?: true>, impl: Phoenix.HTML.FormData.Ecto.Changeset, id: "desk", name: "desk", data: %RldLiveViewStudio.Desks.Desk{__meta__: #Ecto.Schema.Metadata<:built, "desks">, id: nil, name: nil, photo_locations: [], inserted_at: nil, updated_at: nil}, hidden: [], params: %{"name" => "Wally"}, errors: [], options: [method: "post"], index: nil, action: nil}, live_action: nil, streams: %{__changed__: MapSet.new([]), desks: %Phoenix.LiveView.LiveStream{name: :desks, dom_id: #Function<3.113057034/1 in Phoenix.LiveView.LiveStream.new/3>, inserts: [], deletes: []}}, uploads: %{__phoenix_refs_to_names__: %{"phx-F5alJ5A-iS4F6QMC" => :photos}, photos: #Phoenix.LiveView.UploadConfig<name: :photos, max_entries: 3, max_file_size: 10000000, entries: [%Phoenix.LiveView.UploadEntry{progress: 0, preflighted?: true, upload_config: :photos, upload_ref: "phx-F5alJ5A-iS4F6QMC", ref: "0", uuid: "82a6de32-406d-49cd-97e7-fc524021a170", valid?: true, done?: false, cancelled?: false, client_name: "bingo01.jpg", client_relative_path: "", client_size: 47293, client_type: "image/jpeg", client_last_modified: 1679089898580}], accept: ".png,.jpeg,.jpg", ref: "phx-F5alJ5A-iS4F6QMC", errors: [], auto_upload?: false, progress_event: nil, ...>}}, transport_pid: #PID<0.707.0>, ...>, topic: "lv:phx-F5alJ2XuJWOBaQGj", upload_names: %{photos: {"phx-F5alJ5A-iS4F6QMC", nil}}, upload_pids: %{}}
But I changed the name of the @s3_bucketto use an old bucket I have then it work’s!
But I would like to know how to deal with a new bucket.
for others apps.
Most Liked
PrincetonPoh
After setting it to public, you can update the bucket policy to allow read and write access.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<user_iam_id>:user/<bucketname>"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<bucketname>/*",
"arn:aws:s3:::<bucketname>"
]
},
{
"Sid": "AllowAllRead",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::<bucketname>/*",
"arn:aws:s3:::<bucketname>"
]
}
]
}
1
Popular in Questions
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Other popular topics
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









