[PYTHON] I will talk about my first experience

Hello. How are you? How are you doing in Corona? Are you feeling sick?

I used to write something like this ↓. ** AWS on exam: SAA 6th night ** Three months have passed since then. I haven't updated it since then, and I haven't taken the exam yet!

However, I'm still studying and it's almost over. I am thinking of taking the exam soon. Perhaps!

By the way, this time, while watching and listening to the experts, I was taught I remembered while experiencing various new things Those findings? Impressions? I would like to leave it here.

Where I was already in preparation

-Install AWS CLI --Install Serverless Framework -Install pipenv

When I first experienced it, `only English! ``

Serverless? Framework? I didn't understand it, but
# Serverless
Without using a server (actually just a little access)
The mechanism of processing (don't leave anything on the server all the time)
# Framework
I prepared the framework (I bought the legoplock and the manual), so
After that, use it and reassemble it as you like.
I often hear it. Deployed. Deploy. Such.
The literal translation seems to be placement and deployment. (I made a mistake when deploying, deployment is development)
Will you put the data in place?
It seems to be a symbol called Λ.
There seems to be something called lambda calculus.
Perform the calculation and evaluate the arguments to the function:evaluation) and application (English:application)
It is a modeled and abstracted calculation system. It seems ...
It is one of the services in AWS.
A service called a token (a very long alphabet list.
skadfjhakjlsdhfop....I was informed that (or something like that) was issued.
I wrote a description in Python to get it
Since the grammar is managed by indentation, it seems that no matter who writes it, the code will be beautiful and similar.
(Oh! That's why indentation causes an error right away!)
The name Python seems to be named after the British comedy show Monty Python's Flying
When translated into Japanese, Python seems to be a python.

--Python environment construction -Quoted from pyenv / pipenv. Thank you very much.

This is above{install pipenv}It was completed by doing.
pipenv seems to be a tool for managing multiple versions of Python and packages together.

--Git

I often hear this too. I threw a pull request. I've pulled it, so please.
That is the image. When I was in elementary school, I was divided into groups for group research(Repository)You did.
Students in one group discuss and decide what to study(Clone)
Each has a notepad and investigates in various places(Branch)Come back to the classroom,
Report the survey contents to the leader of the group(Commit,Push,PullRequest)To do.
The leader sees the survey results(Review)If it's OK, write it on a large piece of paper(Merge)present.
It's like that. am I wrong. Did you get confused?

Details of the first experience

--Updated AWS Credensial -Details here. I think I often saw the official document this time.

There is something like this.
When you install the AWS CLI, you're on your local PC`~/.aws/credentials`It seems that you can do it.
The contents are like this ↓
[What]
aws_access_key_id =Kanchara
aws_secret_access_key =What
aws_session_token =Kanchara
It's the key to access your AWS account locally.
Credentials...It's kind of like luxury, like cleansing shampoo.
nothing.

--Rewritten 3 files of app.py, handler.py, serverless.yml -Refer to here for the mechanism of handler.py. Thank you very much.

app.py writes the processing details.
handler.py is app.The process of tracing the process of py and leaving it in the log.
serverless.yml is handler.app via py.While undertaking the processing of py, set the content you want to do in AWS.
On the AWS management screen, you can write buttons, selections, and writing fields.{.yml}(It seems to be called Yamur) It is written in the file.

--In Python, --Obtained Token from the specified location --Written the process to place the acquired token in the parameter store of AWS Systems Manager --Written a process to automatically update the placed token at a fixed date and time

I was wondering if I could really do the above.
When I heard this story, I knew the language Python.
When I wrote something, it felt a lot better, and it was about the same level.
Just listen, oh, maybe I should write that over there and do it. I want to go to that level.

--Deployed using sls command -Refer to here for the mechanism of the sls command. Thank you very much. -And here is another point I wanted to know this time was written. Thank you very much. ――Since it is an English site, I don't think you will receive this thank you, but this time I translated the English site and often saw it.

The sls command seems to be an abbreviation for the serverless command.
Only by using this command will the contents created here be set in AWS.
At first, I got various errors such as different tokens of aws.
sls deploy -s dev --profile <It's written here in AWS Credentioals[]Insert the part surrounded by>
You can do anything with a token, but you can't do anything without a token.
Tokens are everything.

--Tested on Lambda function screen

The first thing I got caught{Test event settings}is not it.
I was supposed to be able to do it by pressing the test button,
When I press the test button, some setting screen pops up again! ?? have become.
For the test event settings, give it an appropriate name and
key1:I was able to test it by pressing the create button without changing anything.

--Pururiku, reviewed

It seems that you can also make a pull request with a command,
Basically? It seems good to go to the Github site and press the pull request button.
If there is a gear mark next to the pull request button and you are in a group
It would be nice to be able to set who to review and who to merge.

It's been long, so I'd like to turn the following two to the next time.

Knowledge gained by writing processing in Python

Knowledge gained by rewriting serverless.yml

Recommended Posts

I will talk about my first experience
I passed Java Gold in the first year of joining the company, so I will talk about study methods
For the first time, I learned about Unix (Linux).
[Python] Chapter 01-01 About Python (First Python)
I made my goimports
I searched about Pynamodb
I made a surveillance camera with my first Raspberry PI.